
import 'dart:convert';

List<TeacherClass> teacherClassFromJson(String str) => List<TeacherClass>.from(
    json.decode(str).map((x) => TeacherClass.fromJson(x)));

String teacherClassToJson(List<TeacherClass> data) =>
    json.encode(List<dynamic>.from(data.map((x) => x.toJson())));

class TeacherClass {
  TeacherClass({
    this.schoolAdmin,
    this.classId,
    this.className,
    this.teacherUserNames,
    this.settings,
    this.level,
    this.viewReport,
    this.programId,
  });

  dynamic schoolAdmin;
  String? classId;
  String? className;
  List<String>? teacherUserNames;
  dynamic settings;
  dynamic level;
  dynamic viewReport;
  String? programId;

  factory TeacherClass.fromJson(Map<String, dynamic> json) => TeacherClass(
        schoolAdmin: json["schoolAdmin"],
        classId: json["classId"],
        className: json["className"],
        teacherUserNames: json["teacherUserNames"] != null
            ? List<String>.from(json["teacherUserNames"].map((x) => x))
            : null,
        settings: json["settings"],
        level: json["level"],
        viewReport: json["viewReport"],
        programId: json["programId"],
      );

  Map<String, dynamic> toJson() => {
        "schoolAdmin": schoolAdmin,
        "classId": classId,
        "className": className,
        "teacherUserNames": teacherUserNames != null
            ? List<dynamic>.from(teacherUserNames!.map((x) => x))
            : null,
        "settings": settings,
        "level": level,
        "viewReport": viewReport,
        "programId": programId,
      };
}
